package com.zbkj.crmeb.store.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zbkj.crmeb.front.vo.BrandVo;
import com.zbkj.crmeb.store.dto.StoreBrandDTO;
import com.zbkj.crmeb.store.model.StoreBrand;
import com.zbkj.crmeb.store.request.StoreBrandRequest;
import com.zbkj.crmeb.store.response.ListByCateResponse;
import com.zbkj.crmeb.store.response.StoreBrandResponse;

/**
 * 品牌管理接口
 */
public interface StoreBrandService extends IService<StoreBrand> {

    /**
     *
     * @param brandId
     * @return
     */
    StoreBrand getByBrandId(Integer brandId);

    /**
     *
     * @param list
     * @return
     */
    Map<Integer,String> getBrandNameMap(List<Integer> list);

    /**
     * 处理品牌-在线商品数量
     * true +1, false -1
     */
    void showProductCount(Integer brandId, Boolean flag);

    /**
     * 根据品牌id获取品牌名称
     * @param brandName
     * @return
     */
    List<Integer> brandIdlist(String brandName);

    /**
     * 品牌名称
     * @param brandId
     */
    String getBrandName(Integer brandId);

    StoreBrand getBrandName(String brandName,Integer createUserId);
    
    /**
     * 分页查询
     * @Description:  
     * @author daigb 
     * @param @param request
     * @param @return
     * @return PageInfo<StoreBrandResponse>
     * @throws
     */
    PageInfo<StoreBrandResponse> pageEntity(StoreBrandRequest request);
    
    /**
     * 通过主键查询
     * @Description:  
     * @author daigb 
     * @param @param id
     * @param @return
     * @return StoreBrandResponse
     * @throws
     */
    StoreBrandResponse getEntity(Integer id);
    
    /**
     * 保存
     * @Description:  
     * @author daigb 
     * @param @param dto
     * @param @return
     * @return Boolean
     * @throws
     */
    Boolean saveEntity(StoreBrandDTO dto);
    
    /**
     * 修改
     * @Description:  
     * @author daigb 
     * @param @param dto
     * @param @return
     * @return Boolean
     * @throws
     */
    Boolean updateEntity(StoreBrandDTO dto);
    
    /**
     * 
     * @author cyz
     * @date 2021/5/17 17:00
 * @param request
 * @return java.util.List<com.zbkj.crmeb.store.model.StoreBrand>
     */
    List<StoreBrand> selectStoreBrandList(StoreBrandRequest request);

    void updateList(List<Map<String, Object>> list);


    /**
     * 根据分类类型查看热门品牌列表
     * @param cateType
     * @param merId
     * @return
     */
    ListByCateResponse listByCate(Integer cateType,String cateId, Integer merId);

    /**
     * 商户后台分页
     * @param storeBrandRequest
     * @param merId
     * @return
     */
    PageInfo<StoreBrandResponse> getMerBrandList(StoreBrandRequest storeBrandRequest, Integer merId);

    List<BrandVo> listBrand(Integer merId);

    List<BrandVo> listBrandByMerId(Integer merId);

    List<Integer> getMerShowBrand(Integer merId,String from);
}
